package com.jy.rhin.infra.repo.document.submission.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.jy.rhin.domain.document.submission.entity.DocumentFolderVO;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author dhl
 */
@Data
@NoArgsConstructor
@TableName("t_document_folder")
public class DocumentFolderPO {

    public DocumentFolderPO(long submissionId, DocumentFolderVO folderVO) {
        this.id = folderVO.getId();
        this.submissionId = submissionId;
        this.uniqueId = folderVO.getUniqueId();
        this.patientId = folderVO.getPatientId();
        this.statusCode = folderVO.getStatusCode();
        this.lastUpdateTime = folderVO.getLastUpdateTime();
        this.homeCommunityId = folderVO.getHomeCommunityId();
    }

    @TableId
    private Long id;
    /**
     * 提交集id
     */
    @TableField("submission_id")
    private Long submissionId;
    /**
     * 文档管理域标识
     */
    @TableField("home_community_id")
    private String homeCommunityId;
    /**
     * 患者唯一标识
     */
    @TableField("patient_id")
    private String patientId;
    /**
     * 可用状态;固定值为 New
     */
    @TableField("status_code")
    private String statusCode;
    /**
     * 唯一标识符
     */
    @TableField("unique_id")
    private String uniqueId;
    /**
     * 最后更新时间
     */
    @TableField("last_update_time")
    private Date lastUpdateTime;


}
